Skip to content

feat: add FreeBSD host platform support#515

Closed
mfwolffe wants to merge 5 commits into
tauri-apps:devfrom
mfwolffe:feat/freebsd-support
Closed

feat: add FreeBSD host platform support#515
mfwolffe wants to merge 5 commits into
tauri-apps:devfrom
mfwolffe:feat/freebsd-support

Conversation

@mfwolffe
Copy link
Copy Markdown

Adds FreeBSD as a supported host platform. Without this, building any crate that
depends on cargo-mobile2 fails on FreeBSD with:

compile_error!("Host platform not yet supported by cargo-mobile2!...")

Changes:

  • New os::freebsd module (mirrors the Linux module, reuses xdg.rs via #[path])
  • FreeBSD system info via uname (FreeBSD does not ship /etc/os-release)
  • host_tag() returns "linux-x86_64" for NDK tooling (FreeBSD runs these via Linuxulator)
  • freedesktop_entry_parser dependency gated for FreeBSD alongside Linux

Tested on FreeBSD 15.0-RELEASE (amd64). All existing tests pass unmodified.

@mfwolffe mfwolffe force-pushed the feat/freebsd-support branch from d36150c to b0d827e Compare May 27, 2026 02:46
@mfwolffe
Copy link
Copy Markdown
Author

Closing in favor of the approach taken in tauri-apps/tauri#15439, which gates out cargo-mobile2 on FreeBSD entirely rather than adding platform support. Given that Android Studio and the NDK don't natively target FreeBSD, that's the more pragmatic path. Thanks!

@mfwolffe mfwolffe closed this May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant